CC=g++
CFLAGS=-std=c++11
obj=obj/readline.o	obj/print.o
all:main
	echo ${src}
	echo ${obj}
main:main.o	$(obj)
	$(CC) main.o $(obj)	-omain
main.o:main.cpp
obj/print.o:src/print.cpp	include/print.h
	$(CC) src/print.cpp -c -oobj/print.o
obj/readline.o:src/readline.cpp	include/readline.h
	$(CC) src/readline.cpp -c -oobj/readline.o
clean:
	-rm obj/* out/*

# src:=$(wildcard src/*.cpp)
# headers:=$(wildcard include/*.h)
# obj:=$(subst src,obj,$(src:.cpp=.o))
# CC=g++
# CFLAGS=-std=c++11

# all:main
# main:obj/main.o $(obj)
# 	$(CC) obj/main.o $(obj) -o out/main
# obj/main.o:main.cpp

# $(obj):obj/%.o:src/%.cpp include/%.h
# 	$(CC) $< $(CFLAGS) -c -o$@
# .PHONY:clean
# clean:
# 	-rm obj/* out/*